<style>
.list{
	height: 0.3rem;
	optcity:0.5;
	letter-spacing: 0.02rem;
	margin-top: 0.1rem;
	margin-left: 0.1rem;
}
.curst{
	width: 43%;
	height: 0.3rem;
	background: #3DCE3D;
	optcity:0.5;
	font: 0.15rem/0.3rem "微软雅黑";
	text-align: center;
	letter-spacing: 0.02rem;
	border-radius: 0.5rem;
	margin-left: 0.1rem;
	float:left;
}
.curst a{
	color: white;
}
/*到店标识*/
.s_type{
	text-align: right;
	color: red;
	
}

/*店铺二维码 s*/
.qrcode{
	width: 0.8rem;
	height: 0.8rem;
	position: absolute;
	right: 0.5rem;
	top: 1.8rem;
	z-index:1000;
}

.qrcode canvas{
	width: 100%;
	height: 100%;
} 

.zz{
	width: 100%;
	height: 100%;
	z-index:999;
	background: black;
	opacity: .5;
	position: fixed;
	display: none;
}


#code_img{
	width: 2rem;
	height: 2rem;
	right: 0.8rem;
	border: 1px solid red;
	position: absolute;
	top: 1.8rem;
	z-index: 100;
	display: none;
}

/*店铺二维码 e*/

</style>
<div id="pageInfo" data-title="{$sellerRow['store_name']}"></div>

<?php 
	$openId = 'o7WLlwS6UmVJ2nPgYrqBf7eP7EFg';
	//$openId = ISession::get('wechat_openid');
?>
<script type="text/javascript" src="{theme:javascript/jquery.qrcode.min.js}"></script>
<script src="{theme:javascript/jquery.slider.js}"></script>
<div class="home_banner">
     {if:$this->home_slide}
    <ul>
        {foreach:items=$this->home_slide}
	        {if:$item}
	        <li>
	           <img src="{url:/pic/thumb/img/$item}">		
	        </li>
	        {/foreach}
        {/if}
    </ul>
    {/if}
</div>

<section class="seller_info">
	<div class="qrcode">
	</div>
	
	<script type="text/javascript">
		//二维码
		$('.qrcode').qrcode("{url:http://www.micarline.net/site/home/id/$sellerRow['id']}");
	</script>
	
	<img id="code_img" alt="" src="">
	
	<!-- 遮罩 -->
	<div class="zz"></div>
	
    <dl>
        <dt>评分：</dt>
       
        <dd>
            <em class="star star_{echo:statistics::gradeSeller($sellerRow['id'])}"></em>
        </dd>
    </dl>
    <dl>
        <dt>销量：</dt>
        <dd>{echo:statistics::sellCountSeller($sellerRow['id'])} 件</dd>
    </dl>
    <dl>
        <dt>联系电话：</dt>
        <dd>{$sellerRow['phone']}</dd>
    </dl>
    <dl>
        <dt>所在地：</dt>
        <dd>{echo:join(' ',area::name($sellerRow['province'],$sellerRow['city'],$sellerRow['area']))} {$sellerRow['address']}</dd>
    </dl>
    
    <!-- 
    <dl>
    	<a href="{url:/site/mobil_chat/t_id/$sellerRow['id']}">联系客服</a>
    </dl>
     -->
    <div class="list">
	    <div class="curst"><!-- $sellerRow['id'] -->
	    	<a href="{url:/site/mobil_chat/t_id/0}">联系客服</a>
	    </div>
	     <div class="curst">
	    	<a href="http://apis.map.qq.com/tools/poimarker?type=0&marker=coord:{$sellerRow['gps']};title:{$sellerRow['store_name']};addr:{$sellerRow['mobile']}&key=GWEBZ-TN635-YIEI5-QV4LJ-RXJ2H-7KFXC&referer=testMap">导航</a>
	    </div>
   </div>
</section>




{set:plugin::trigger("onServiceButton",$sellerRow['id'])}
{set:$goodsObj = search_goods::find(array('go.seller_id' => $seller_id,'go.xiaoshou_type'=>0),20);$resultData = $goodsObj->find();}
{if:$resultData}
<aside class="goods_sort">
    {foreach:items=search_goods::getOrderType()}
    <span class="sort_btn" onclick="gourl('{echo:search_goods::searchUrl(array('order','by'),array($key,search_goods::getOrderBy($key)))}')">{$item}</span>
    {/foreach}
</aside>
<section class="goods_list">
    <ul>
        {foreach:items=$resultData}
        <li>
            <a href="{url:/site/products/id/$item[id]}">
                <i class="photo"><img class="goods_photo" src="{url:/pic/thumb/img/$item[img]/w/200/h/200}" alt="{$item['name']}"></i>
                <h3 class="name"><strong>{$item['name']}</strong></h3>
                {if:$item['good_type'] == 2}
					<h5 class="s_type">到店</h5>
				{/if}
                <del class="old_price">￥{$item['market_price']}</del>
                <em class="price">￥{$item['sell_price']}</em>
                
                <?php 
                	$tichen= $item['sell_price'] *  $item['xiaoshouticheng'] / 100;
					$tichen = substr(sprintf("%.3f",$tichen),0,-1);
                ?>
                
                 {query:name = seller where=wecharbang eq '$openId'}	
                
                <span style="display: block;margin-top: 10px;">销售提成：<span style="color: red">￥{$tichen}</span></span>
            	{/query}
                
            </a>
        </li>
        {/foreach}
    </ul>
</section>
{$goodsObj->getPageBar()}
{else:}
<section class="nodata">商品进货中，请稍后关注上架情况</section>
{/if}


<script>
$(function(){
    // 隐藏底部导航
    //hideNav();
    
    //点击验证码响应
	$(".qrcode").click(function(){
		$(".zz").show();
		$(this).css("width","2rem");
		$(this).css("height","2rem");
		$(this).css("right","0.8rem");
	});
	
    //点击遮罩层响应
	$(".zz").click(function(){
		$(this).hide();
		$(".qrcode").css("width","0.8rem");
		$(".qrcode").css("height","0.8rem");
		$(".qrcode").css("right","0.5rem");
		
	});

    // 切换导航样式
    var order = getUrlParam("order");
    var by = getUrlParam("by");
    var sortBtn = $(".goods_sort").children('.sort_btn');
    // sortBtn.eq(2).append('<i>');
    if(order=="sale"){
        if (by=="desc") {sortBtn.eq(0).addClass('on').append('<i class="icon-angle-down"></i>')}
        else {sortBtn.eq(0).addClass('on').append('<i class="icon-angle-up"></i>');}

    }else if (order=="cpoint"){
        if (by=="desc") {sortBtn.eq(1).addClass('on').append('<i class="icon-angle-down"></i>')}
        else {sortBtn.eq(1).addClass('on').append('<i class="icon-angle-up"></i>');}
    }else if(order=="price"){
        if (by=="desc") {sortBtn.eq(2).addClass('on').append('<i class="icon-angle-down"></i>')}
        else {sortBtn.eq(2).addClass('on').append('<i class="icon-angle-up"></i>');}
    }else if(order=="new"){
        if (by=="desc") {sortBtn.eq(3).addClass('on').append('<i class="icon-angle-down"></i>')}
        else {sortBtn.eq(3).addClass('on').append('<i class="icon-angle-up"></i>');}
    }else{
        sortBtn.eq(0).addClass('on');
    };
});


//防止冒泡方法
function stopPropagation(e) {
    if (e.stopPropagation) 
      e.stopPropagation();//停止冒泡  非ie
    else
      e.cancelBubble = true;//停止冒泡 ie
}

</script>

